package com.csw.android.dev_utils.ui.databinding

import android.view.View
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * 基于一个第三方recyclerView适配器框架中的BaseViewHolder扩展来的DataBindingViewHolder
 */
class DataBindingViewHolder<V : ViewDataBinding>(view: View) : BaseViewHolder(view) {
    val dataBinding = DataBindingUtil.bind<V>(view) ?: throw RuntimeException("Can not find data binding")
}